home *** CD-ROM | disk | FTP | other *** search
- > :) Some time ago, people here talked about a tool that makes it
- > :) possible to develop a specialized compiler very quickly.
- >
- > I would love to hear more about this compiler - could anyone provide any
- > further information, for example, downloadables/links etc.?
-
- The tools Bertrand is talking about are lex and yacc, or their GNU
- equivalents flex and bison.
-
- Lex is a lexical analyser generator. Simply put, it can create a program
- that breaks a text down into components according to rules. In a compiler
- it would be used to recognize numbers, keywords etc.
-
- Yacc (yet another compiler compiler) will create a parser for 'any' language
- given a grammar for it. Usually you send the symbols extracted by lex into
- yacc, which finally calls your own C routines to build a graph of the input.
-
- Lex/yacc are of course useful for lots of things that are not as complicated
- as programming languages. A calculator, for example, is incredibly easy to do.
-
-
- Any UNIX system should have lex and yacc, and many also have flex and bison.
-
- If you're interested I could locate a simple Pascal-like compilator or a
- single-pass RISC assembler I wrote for courses at the University a couple
- of years ago. I also have a 70% finished compiler for a functional language,
- which I soon must finish up (the lecture part of that course ended well
- before Christmas, but...).
-
- > I only ask in view of Nicklas Larsson's Glasnost idea (to create a new games
- > orientated programming language).
-
- Since he's studying computer technology, he's very likely to already know
- about the programs I mentioned.
-
- By the way, is the information on his Web page all that is available?
- From the description there, it seems to me like using ordinary C/C++ with
- a few libraries and perhaps a real time kernal would be better.
-
- --
- Chalmers University | Why are these | e-mail: rand@cd.chalmers.se
- of Technology | .signatures | johan@rand.thn.htu.se
- | so hard to do | WWW/ftp: rand.thn.htu.se
- Gothenburg, Sweden | well? | (MGIFv5, QLem, BAD MOOD)
-
-